<?php
global $themeblvd_seo_plugin;
global $themeblvd_theme_body_style;
global $themeblvd_theme_background;
global $themeblvd_theme_skin;
global $themeblvd_theme_link_color;
global $themeblvd_font_headers;
global $themeblvd_font_body;
global $themeblvd_font_size;
global $themeblvd_logo_url;
global $themeblvd_default_homepage_color;
global $themeblvd_custom_css;
global $themeblvd_show_search;
global $themeblvd_logo;
global $themeblvd_logo_image;
?>
<!DOCTYPE html>   
<html lang="en"> 
<head>
 
    <meta charset="<?php bloginfo('charset'); ?>" />
	
	<?php if ( get_option('blog_public') == 1 && $themeblvd_seo_plugin == 'true') : ?>
	    <!-- ThemeBlvd SEO -->
	    <?php global $seo; $seo->themeblvd_head(); ?>
	<?php else : ?>
	    <!-- Default Title  -->
	    <?php themeblvd_title(); ?>
	<?php endif; ?>
	    
	<!-- Core CSS -->
	<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
	
	<!-- Theme Style CSS -->
	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/layout/css/style/<?php echo $themeblvd_theme_body_style; ?>.css" />
	
	<!-- Theme Background CSS -->
	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/layout/css/bg/<?php echo $themeblvd_theme_background; ?>.css" />
	
	<!-- Theme Skin CSS -->
	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/layout/css/skin/<?php echo $themeblvd_theme_skin; ?>.css" />
	
	<!-- Wordpress Header stuff -->
	<?php wp_enqueue_script("jquery"); ?>
	<?php wp_head(); ?>
	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
	
	<!-- JS -->
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/js/swfobject.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/js/cycle.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/js/hoverIntent.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/js/superfish.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/plugins/prettyphoto/js/jquery.prettyPhoto.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/plugins/nivo/jquery.nivo.slider.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/js/validate.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/layout/js/custom.js"></script>
	
	<!-- Font -->
	<?php themeblvd_font($themeblvd_font_headers, $themeblvd_font_body, $themeblvd_font_size); ?>
	
	<!-- Custom CSS -->
	<style type="text/css">
	#slideshow .description{
		background-color: #<?php echo $themeblvd_default_homepage_color; ?>
	}
	<?php if($themeblvd_theme_link_color) : ?>
	a,
	#content .entry h3 a:hover,
	#content .archive h3 a:hover,
	#sidebar .widget li a:hover,
	#portfolio .portfolio-box h3 a:hover { 
		color: #<?php echo $themeblvd_theme_link_color; ?>
	}
	<?php endif; ?>
	<?php echo $themeblvd_custom_css; ?>
	</style>
	
	<!-- Comments -->
	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
	
	<!-- Meta Tags (for js) -->
	<meta name="template_url" content="<?php echo get_bloginfo('template_url'); ?>" />

</head>

<body>

<div id="wrapper">

    <!-- HEADER (start) -->

    <div id="header">
        <?php if($themeblvd_logo == 'text') : ?>

        <h1 id="logo-text">
            <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('title'); ?>">
                <?php bloginfo('title'); ?>
            </a>
        </h1>

        <?php else : ?>
        
        <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('title'); ?>" id="logo">
            <?php if($themeblvd_logo_image) : ?>
            <img src="<?php echo $themeblvd_logo_image; ?>" alt="<?php bloginfo('title'); ?>" />
            <?php else : ?>
            <img src="<?php bloginfo('template_directory'); ?>/layout/images/shared/logo-dark.png" alt="<?php bloginfo('title'); ?>" />
            <?php endif; ?>
        </a>

        <?php endif; ?>
        
        <div class="top">
        
            <!-- Header Area Widgets (start) -->
    
            <?php if ( is_sidebar_active('header') ) : ?>
    
                    <?php dynamic_sidebar('header'); ?>
    
            <?php endif; ?>
            
            <!-- Header Area Widgets (end) -->
        </div>

        <div class="clear"></div>

    </div><!-- #header (end) -->

    <!-- HEADER (end) -->

    <!-- MAIN MENU (start) -->

    <div id="menu-wrapper">
        
        <?php wp_nav_menu( array('container' => '', 'theme_location' => 'primary', 'fallback_cb' => 'themeblvd_menu_fallback' ) ); ?>
        <?php if($themeblvd_show_search == 'true') : ?>
                <?php get_search_form(); ?>
            <?php endif; ?>
    </div><!-- menu-wrapper (end) -->

    <!-- MAIN MENU (end) -->
<div class="clear"></div>
    <div id="main">
